Version 3.0 User's Guide |
|
Files |
Previous |
Next Contents |
The first tab of the Configuration window allows you to set the root folder and special file names needed by NetCloak.
Figure 3: The Files page of the NetCloak Web admin interface.
There are three special files NetCloak requires to handle certain HTML requests.
Default Page: The name of the page NetCloak will look for when the user specifies only a directory (including the root domain). For example, if the default page is set to "HomePage.html", then NetCloak will look for that filename by default when only a directory is specified by an incoming URL request.
Note that this field should not begin with a colon (':') character, since this field specifies a filename, not the path to an actual file. The filename in this field is appended to the incoming URL.
Error Page: When NetCloak is unable to find a file that matches an incoming URL, the Error Page is returned. This field specifies an actual file to be returned; thus, it contains the path to the file, relative to the configured Root Folder. If the error file is in the Root Folder, then this field should begin with a colon (':') followed by the name of the file.
If the field does not begin with a colon, then NetCloak looks for the error file in the same folder as the requested file. Although this is an unusual setup, it can be used to provide a custom error page for every folder on your web site.
A CGI application can also be specified as the error file, in which case NetCloak will call the CGI to handle the bad request. If the error file is suffix-mapped to a "back-end" CGI or plug-in in the "NetCloak.bsm" file, NetCloak will also call the back-end CGI or plug-in to process the error file. In either case, any NetCloak commands in the text returned from the "error CGI" are processed before returning the response to the browser.
When serving multiple virtual domains from your Web server, the named Error Page must exist in each virtual domain's root folder. Since NetCloak can resolve aliases, you may simply create an alias to an Error Page in each virtual domain's root folder.
No Access Page: The "No Access" page is returned when a user is denied access to a page because their IP address is denied or because they fail to enter a correct username and password for a password protected page. This field, too, represents the path to an actual file, so it should also begin with a colon, followed by the filename, if it represents a file in the web server Root Folder. As with the Error Page setting, this field may contain the path to a CGI, or the path to a file which is suffix-mapped to a back-end CGI or plug-in.
When serving multiple virtual domains from your Web server, the named No Access Page must exist in each virtual domain's root folder. Since NetCloak can resolve aliases, you may simply create an alias to a No Access Page in each virtual domain's root folder.
Ask Server: (CGI only) Most web servers also have their own settings for the three special file names. In particular, WebSTAR and WebTen provide access to these filenames via AppleScript, so NetCloak can retrieve the file names directly from either of these two Web servers when you click this button. The button is only enabled if one of these two servers is up and running on the same machine along with NetCloak. If you are using another Web server, this button will not work, and you will have to set the filenames manually.
Ask Server for File Names: (Plug-In only) Some Web servers allow the administrator to configure separate default, error, and no-access files for multiple virtual domains. The NetCloak plug-in can get the names of the three files directly from the Web server, on the fly, as each request is processed. This lets it use the correct file names for each request to a virtual domain. Check this checkbox in the NetCloak web admin "Files" page to configure NetCloak this way. If you want the NetCloak plug-in to always use the file names configured in NetCloak, uncheck this checkbox.
Choose the folder NetCloak should serve files from. To select the folder, click on the "Root Folder" button and choose the folder with the standard file dialog box that appears.
The selected Root Folder is used as the root folder for all NetCloak commands which accept a relative path, including macros, back-end CGIs and NetCloak aliases.
In most cases, the Root Folder will be the same folder as your Web server's root folder. The ability to select the Root Folder has two important advantages. First, when using the NetCloak CGI, this allows you to put the CGI application anywhere you wish, for example, in a "cgi-bin" folder, while serving from the Web server root. In addition, the NetCloak root folder is not required to be the same as the server root folder. For example, if you are concerned about security, you can put your NetCloak files into a separate folder hierarchy from the main server folder structure. This will ensure that files that are supposed to be cloaked are never inadvertently served by your server without NetCloak processing them. Since the cloaked files will be outside of your Web server folder, the server will never be allowed to serve them.
Important Note: This assumes you are running a server that restricts access to a Web server root folder and that you have not placed any Finder aliases in your server root folder that would permit access to the NetCloak -defined root folder. It also does not take into consideration other CGIs that might be able to serve files outside the Web server root.
Ask Server For Root Folder: If the server supplies a root folder as part of the CGI AppleEvent or WebSTAR API request, and this option is checked, NetCloak will disregard the configured Root Folder setting and serve from the folder specified by the Web server. Many web servers support this parameter, and selecting this option is the best way to ensure seamless file services when using NetCloak in conjunction with your server. This is especially true of servers that support multiple root folders for different domains. In this case, the folder to serve from may be different for each request that is processed by NetCloak. When this option is checked, NetCloak will always serve the file from the appropriate folder, as intended.
Note that when this option is checked, NetCloak will use the root folder specified by the server for each request that it receives. NetCloak will still use the folder selected with the "Root Folder" button to locate NetCloak aliases and other files that are read during startup or outside of any HTTP connection request.
Copyright © 1996-1999 Maxum Development Corporation http://www.maxum.com/ |
Previous |
Next Contents |